/* 推荐内容卡片样式 */
.card {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #000;
  overflow: hidden;
}

.mediaContainer {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

.videoContainer {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  cursor: pointer;
}

/* 视频控制按钮容器 */
.videoControls {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  gap: 12px;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  padding: 15px; /* 增加点击区域 */
  z-index: 9; /* 确保控制按钮在合适的层级 */
}

.videoControls.visible {
  opacity: 1;
  pointer-events: auto;
}

.playButton,
.muteButton {
  width: 48px !important;
  height: 48px !important;
  background-color: rgba(0, 0, 0, 0.6) !important;
  color: white !important;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  transition: all 0.3s ease !important;
}

.playButton:hover,
.muteButton:hover {
  background-color: rgba(0, 0, 0, 0.8) !important;
  transform: scale(1.1);
}

/* 播放进度条容器 */
.progressContainer {
  position: absolute;
  bottom: 30px;
  left: 20px;
  right: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  padding: 10px; /* 增加点击区域 */
  margin: -10px; /* 抵消padding对布局的影响 */
  z-index: 10; /* 确保进度条在overlay之上但不遮挡其他按钮 */
}

.progressContainer.visible {
  opacity: 1;
  pointer-events: auto;
}

.progressBar {
  flex: 1;
  height: 30px; /* 增加点击区域高度 */
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 10px 0; /* 增加垂直点击区域 */
}

.progress {
  width: 100%;
  height: 4px !important;
  background-color: rgba(255, 255, 255, 0.3) !important;
  border-radius: 2px !important;
  cursor: pointer;
  transition: height 0.2s ease;
}

.progress:hover {
  height: 6px !important;
}

.progress .MuiLinearProgress-bar {
  background-color: #ff4757 !important;
  border-radius: 2px !important;
  transition: background-color 0.2s ease;
}

.progress:hover .MuiLinearProgress-bar {
  background-color: #ff3742 !important;
}

.timeDisplay {
  display: flex;
  align-items: center;
  color: white;
  font-size: 12px;
  font-weight: 500;
  background-color: rgba(0, 0, 0, 0.6);
  padding: 4px 8px;
  border-radius: 4px;
  backdrop-filter: blur(10px);
  min-width: 80px;
  justify-content: center;
}

.currentTime {
  color: #ff4757;
}

.duration {
  color: rgba(255, 255, 255, 0.8);
}

.keyboardHints {
  position: absolute;
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%);
  background-color: rgba(0, 0, 0, 0.8);
  color: rgba(255, 255, 255, 0.9);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 10px;
  white-space: nowrap;
  backdrop-filter: blur(10px);
  animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  color: white;
  padding: 20px;
  z-index: 2;
}

.userInfo {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
}

.avatar {
  width: 40px !important;
  height: 40px !important;
  margin-right: 12px !important;
  border: 2px solid white;
}

.username {
  font-weight: 600 !important;
  font-size: 16px !important;
  margin-bottom: 4px !important;
}

.title {
  font-size: 18px !important;
  font-weight: 700 !important;
  margin-bottom: 8px !important;
  line-height: 1.3 !important;
}

.description {
  font-size: 14px !important;
  line-height: 1.4 !important;
  margin-bottom: 12px !important;
  opacity: 0.9;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.stats {
  display: flex;
  align-items: center;
  gap: 16px;
}

.statItem {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px !important;
}

.statIcon {
  font-size: 18px !important;
}

.actionButtons {
  position: absolute;
  right: 16px;
  bottom: 80px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  z-index: 3;
}

.actionButton {
  width: 48px !important;
  height: 48px !important;
  background-color: rgba(255, 255, 255, 0.2) !important;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3) !important;
  color: white !important;
  transition: all 0.3s ease !important;
}

.actionButton:hover {
  background-color: rgba(255, 255, 255, 0.3) !important;
  transform: scale(1.1);
}

.actionButton.liked {
  background-color: rgba(244, 67, 54, 0.8) !important;
  color: white !important;
}

.actionButton.liked:hover {
  background-color: rgba(244, 67, 54, 0.9) !important;
}

.loadingContainer {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background-color: #000;
}

.errorContainer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background-color: #000;
  color: white;
  text-align: center;
  padding: 20px;
}

.errorTitle {
  font-size: 18px !important;
  margin-bottom: 8px !important;
}

.errorMessage {
  font-size: 14px !important;
  opacity: 0.7;
  margin-bottom: 16px !important;
}

/* 移动端优化 */
@media (max-width: 768px) {
  .overlay {
    padding: 16px;
  }
  
  .actionButtons {
    right: 12px;
    bottom: 60px;
    gap: 12px;
  }
  
  .actionButton {
    width: 44px !important;
    height: 44px !important;
  }
  
  .playButton,
  .muteButton {
    width: 44px !important;
    height: 44px !important;
  }
  
  .progressContainer {
    bottom: 16px;
    left: 16px;
    right: 16px;
    padding: 15px; /* 移动端增加更大的点击区域 */
    margin: -15px;
  }
  
  .progressBar {
    height: 40px; /* 移动端增加更大的点击区域 */
    padding: 15px 0;
  }
  
  .timeDisplay {
    font-size: 11px;
    min-width: 70px;
  }
  
  .keyboardHints {
    font-size: 9px;
    bottom: -25px;
  }
  
  .title {
    font-size: 16px !important;
  }
  
  .description {
    font-size: 13px !important;
  }
} 